<template>
	<view class="content">
		<view class="serch">
			<u--input prefixIcon="search" fontSize="27rpx" :adjustPosition="false" placeholderStyle="color: #999999"
				placeholder="请输入关键字" border="none" v-model="value" confirmType="search"></u--input>
		</view>
		<view class="good-icon">
			<view class="icon-left" @click="goCart">
				<view class="icon-text">
					<view class="icon-title">购物车</view>
					<view>一键下单购买</view>
				</view>
				<image :src="$IMG_URL+'shoppingCart.png'" style="width: 96rpx;height: 96rpx;margin-left: 21rpx;">
				</image>
			</view>
			<view class="icon-left" @click="goorder">
				<view class="icon-text">
					<view class="icon-title">我的订单</view>
					<view>查询全部订单</view>
				</view>
				<image :src="$IMG_URL+'order.png'" style="width: 96rpx;height: 96rpx;margin-left: 21rpx;">
				</image>
			</view>
		</view>
		<view class="good-list">
			<view class="good-item" v-for="(item,index) in 20" :key="index" @click="goDetail">
				<image src="https://cdn.uviewui.com/uview/swiper/1.jpg" mode="aspectFill" class="item-img"></image>
				<view class="tem-desc">
					<view class="desc-title">商品标题文字内容商品标题文字内容商品标题文字内容商品标题文字内容</view>
					<view class="desc-price">￥20.00</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: ''
			}
		},
		methods: {
			goCart() {
				uni.navigateTo({
					url: '/pages/shop/cart/cart'
				})
			},
			goorder() {
				uni.navigateTo({
					url: '/pages/shop/orderGood/orderGood'
				})
			},
			goDetail() {
				uni.navigateTo({
					url: '/pages/shop/detail/detail'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100vw;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 23rpx;
		padding-bottom: calc(env(safe-area-inset-bottom) / 2 + 23rpx) !important;
	}

	.serch {
		width: 688rpx;
		height: 77rpx;
		background: #FFFFFF;
		border-radius: 38rpx;
		display: flex;
		align-items: center;
		padding: 0 23rpx;
	}

	.good-icon {
		margin-top: 23rpx;
		width: 688rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.icon-left {
		width: 333rpx;
		height: 146rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.icon-text {
		font-size: 23rpx;
		color: #999999;
	}

	.icon-title {
		font-weight: 500;
		font-size: 31rpx;
		color: #000000;
	}

	.good-list {
		width: 742rpx;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		margin-left: 8rpx;

		.good-item {
			width: 333rpx;
			// height: 510rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			margin-left: 23rpx;
			margin-top: 23rpx;

			.item-img {
				width: 333rpx;
				height: 333rpx;
				border-radius: 10rpx 10rpx 0 0;

			}

			.tem-desc {
				width: 100%;
				padding: 19rpx 15rpx;
				padding-bottom: 23rpx;
				font-weight: 500;
				font-size: 31rpx;
				color: #FF3902;

				.desc-title {
					font-size: 27rpx;
					color: #000000;
					width: 303rpx;
					height: 77rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					-webkit-line-clamp: 2;
					display: -webkit-box;
					-webkit-box-orient: vertical;

				}

				.desc-price {
					margin-top: 15rpx;
				}
			}


		}
	}
</style>